<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="../static/plugins/element-ui/index.css">
    <style>
        body {
          overflow-x: hidden;
        }
    </style>
</head>
<body>
<div id="app">
    <el-row>
        <el-button @click="test01()">test01</el-button>
        <el-button type="primary" @click="test02()">add</el-button>
        <el-button type="success" @click="test03()">query</el-button>
        <el-button type="info" @click="test04()">admin</el-button>
        <el-button type="warning" @click="test05()">logout</el-button>
    </el-row>
</div>
</body>
<script src="/static/plugins/vue/vue.js"></script>
<script src="/static/plugins/element-ui/index.js"></script>
<script src="/static/plugins/axios/axios.min.js"></script>
<script src="/static/js/request.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
        },
        created(){
        },
        mounted() {
        },
        methods: {
            test01(){
                $axios({
                    url: '/test/test01',
                    method: 'get',
                    params: null
                }).then((res) => {
                   console.log(res);
                });
            },
            test02(){
                $axios({
                    url: '/add',
                    method: 'get',
                    params: null
                }).then((res) => {
                   console.log(res);
                });
            },
            test03(){
                $axios({
                    url: '/query',
                    method: 'get',
                    params: null
                }).then((res) => {
                    console.log(res);
                });
            },
            test04(){
                $axios({
                    url: '/admin',
                    method: 'get',
                    params: null
                }).then((res) => {
                    console.log(res);
                });
            },
            test05(){
                window.top.location.href = '/logout'
            }
        }
    });
</script>
</html>